<?php

namespace app\common\model\course;

use app\common\library\Utils;
use think\Model;

class Chapter extends Model
{
    protected $name = 'learn_course_chapter';
    // 开启自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';
    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = false;


    //时间获取器
    public function getCreatetimeAttr($value)
    {
        $time = Utils::time_format($value);
        return $time;
    }


}
